Skip to content

Add WebRTC auto-reconnect for player and broadcaster#525

Draft
sleroq wants to merge 1 commit intomainfrom
webrtc-reconnection
Draft

Add WebRTC auto-reconnect for player and broadcaster#525
sleroq wants to merge 1 commit intomainfrom
webrtc-reconnection

Conversation

@sleroq
Copy link
Copy Markdown
Collaborator

@sleroq sleroq commented Mar 3, 2026

Summary

  • Add a shared reconnect controller hook with bounded exponential backoff, jitter, and cancel/reset controls.
  • Implement viewer (WHEP) auto-reconnect on offline/disconnect paths and classify setup failures as retryable vs fatal.
  • Implement broadcaster (WHIP) auto-reconnect on ICE/SSE/transient setup failures, and clean up stale WHIP sessions via DELETE on replace/unmount.

@sleroq sleroq force-pushed the webrtc-reconnection branch from fea877b to c867527 Compare March 3, 2026 19:52
@Sean-Der
Copy link
Copy Markdown
Collaborator

Sean-Der commented Mar 3, 2026

@sleroq This is great! Will be nice for server restarts, right now it's pretty painful.

WebRTC should reconnect automatically on ICE failures, I should make sure that is working ok. WHIP also has ICE Restarts so you can keep one WebRTC connection and keep re-using it. I try to lean into the WebRTC native stuff as much as possible (so OBS/FFmpeg/GStreamer/Mobile clients) get the benefits not just web.

Keep up the great work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants